package com.scy.java.base;

import java.util.Scanner;

//if ...else if......else
//奖励机制
public class Demo07 {
    public static void main(String[] args) {
        System.out.println("请输入成绩：");
        int score = new Scanner(System.in).nextInt();
        //对成绩的合法性校验
        if (score >=0 && score <=100){
            //成绩合法有效
            System.out.println("成绩合法有效");
            if (score>=95 && score<=100){
                System.out.println("奖励自行车一辆");
            } else if (score>=90 && score<=94) {
                System.out.println("奖励游乐园一日游");
            } else if (score >= 80 && score <= 89) {
                System.out.println("奖励变形金刚一个");
            }else {
                System.out.println("七匹狼喂饱");
            }
        }else {
            //成绩不合法
            System.out.println("成绩不合法");
        }
    }
}
